<template>
	<view style="padding: 30rpx;">
		<button @click="callSetStorage()">setStorage</button>
		<button @click="callGetStorage()">获取缓存</button>
		<button @click="callStoInfo()">获取字段列表</button>
		<button @click="onInteral()">删除</button>
		<button @click="onClearInter()">清空</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			}
		},
		methods: {
			callSetStorage(){
				console.log("callSetorage--> userName kangkang");
				uni.setStorage({
					key:"userName",
					data:"kangkang",
					success(){
						console.log("存储userName 成功回调")
					},
					fail(){
						console.error("shibai")
					},
					complete(){
						
					}
				})
			
			},
			callGetStorage({
				uni.getStorage(){
					key:"uderName",
					success:function(result){
						console.log("获取本地缓存成功 result.data:"+ result.data);
					},
					fail:function(e){
						console.error("获取本地缓存失败:" +e);
					}
				}
			}),
			callStoInfo(){
				console.log("callStoInfo-->");
				uni.getStorageInfo({
					
				})
			}
		}
	}
</script>

<style>

</style>
